﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AgregarProveedores.aspx.cs" Inherits="AgregarProveedores" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            color: #FF3300;
        }
    </style>
</head>
<body bgcolor="#ccccff">
    <form id="form1" runat="server">
    <div>
    
        <asp:SqlDataSource ID="sqlproveedor" runat="server" 
            ConflictDetection="CompareAllValues" 
            ConnectionString="<%$ ConnectionStrings:SuperMercado %>" 
            DeleteCommand="DELETE FROM [Proveedor] WHERE [Cod_Proveedor] = @original_Cod_Proveedor AND [Nombre_Proveedor] = @original_Nombre_Proveedor AND [Direccion] = @original_Direccion AND [Telefono] = @original_Telefono AND [Registro] = @original_Registro AND [Nit] = @original_Nit AND [Giro] = @original_Giro AND (([Correo_Electronico] = @original_Correo_Electronico) OR ([Correo_Electronico] IS NULL AND @original_Correo_Electronico IS NULL))" 
            InsertCommand="INSERT INTO [Proveedor] ([Cod_Proveedor], [Nombre_Proveedor], [Direccion], [Telefono], [Registro], [Nit], [Giro], [Correo_Electronico]) VALUES (@Cod_Proveedor, @Nombre_Proveedor, @Direccion, @Telefono, @Registro, @Nit, @Giro, @Correo_Electronico)" 
            OldValuesParameterFormatString="original_{0}" 
            SelectCommand="SELECT * FROM [Proveedor]" 
            UpdateCommand="UPDATE [Proveedor] SET [Nombre_Proveedor] = @Nombre_Proveedor, [Direccion] = @Direccion, [Telefono] = @Telefono, [Registro] = @Registro, [Nit] = @Nit, [Giro] = @Giro, [Correo_Electronico] = @Correo_Electronico WHERE [Cod_Proveedor] = @original_Cod_Proveedor AND [Nombre_Proveedor] = @original_Nombre_Proveedor AND [Direccion] = @original_Direccion AND [Telefono] = @original_Telefono AND [Registro] = @original_Registro AND [Nit] = @original_Nit AND [Giro] = @original_Giro AND (([Correo_Electronico] = @original_Correo_Electronico) OR ([Correo_Electronico] IS NULL AND @original_Correo_Electronico IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_Cod_Proveedor" Type="String" />
                <asp:Parameter Name="original_Nombre_Proveedor" Type="String" />
                <asp:Parameter Name="original_Direccion" Type="String" />
                <asp:Parameter Name="original_Telefono" Type="String" />
                <asp:Parameter Name="original_Registro" Type="String" />
                <asp:Parameter Name="original_Nit" Type="String" />
                <asp:Parameter Name="original_Giro" Type="String" />
                <asp:Parameter Name="original_Correo_Electronico" Type="String" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="Cod_Proveedor" Type="String" />
                <asp:Parameter Name="Nombre_Proveedor" Type="String" />
                <asp:Parameter Name="Direccion" Type="String" />
                <asp:Parameter Name="Telefono" Type="String" />
                <asp:Parameter Name="Registro" Type="String" />
                <asp:Parameter Name="Nit" Type="String" />
                <asp:Parameter Name="Giro" Type="String" />
                <asp:Parameter Name="Correo_Electronico" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="Nombre_Proveedor" Type="String" />
                <asp:Parameter Name="Direccion" Type="String" />
                <asp:Parameter Name="Telefono" Type="String" />
                <asp:Parameter Name="Registro" Type="String" />
                <asp:Parameter Name="Nit" Type="String" />
                <asp:Parameter Name="Giro" Type="String" />
                <asp:Parameter Name="Correo_Electronico" Type="String" />
                <asp:Parameter Name="original_Cod_Proveedor" Type="String" />
                <asp:Parameter Name="original_Nombre_Proveedor" Type="String" />
                <asp:Parameter Name="original_Direccion" Type="String" />
                <asp:Parameter Name="original_Telefono" Type="String" />
                <asp:Parameter Name="original_Registro" Type="String" />
                <asp:Parameter Name="original_Nit" Type="String" />
                <asp:Parameter Name="original_Giro" Type="String" />
                <asp:Parameter Name="original_Correo_Electronico" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style1"><strong>&nbsp;PROVEEDORES<asp:Image 
            ID="Image1" runat="server" ImageUrl="~/icons/66.png" />
        &nbsp;</strong></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:DetailsView 
            ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False" 
            CellPadding="4" DataKeyNames="Cod_Proveedor" DataSourceID="sqlproveedor" 
            ForeColor="#333333" GridLines="None" Height="50px" Width="125px">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
            <EditRowStyle BackColor="#999999" />
            <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
            <Fields>
                <asp:BoundField DataField="Cod_Proveedor" HeaderText="Cod_Proveedor" 
                    ReadOnly="True" SortExpression="Cod_Proveedor" />
                <asp:BoundField DataField="Nombre_Proveedor" HeaderText="Nombre_Proveedor" 
                    SortExpression="Nombre_Proveedor" />
                <asp:BoundField DataField="Direccion" HeaderText="Direccion" 
                    SortExpression="Direccion" />
                <asp:BoundField DataField="Telefono" HeaderText="Telefono" 
                    SortExpression="Telefono" />
                <asp:BoundField DataField="Registro" HeaderText="Registro" 
                    SortExpression="Registro" />
                <asp:BoundField DataField="Nit" HeaderText="Nit" 
                    SortExpression="Nit" />
                <asp:BoundField DataField="Giro" HeaderText="Giro" 
                    SortExpression="Giro" />
                <asp:BoundField DataField="Correo_Electronico" HeaderText="Correo_Electronico" 
                    SortExpression="Correo_Electronico" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                    ShowInsertButton="True" />
            </Fields>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        </asp:DetailsView>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx">&lt;&lt; Ir  Pagina Inicio</asp:HyperLink>
    
    </div>
    </form>
</body>
</html>
